Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove callbacks from job_queue_node #6118

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

JHolba
Copy link
Contributor

@JHolba JHolba commented Sep 20, 2023

Approach
job queue node now calls forward_model_ok directly instead of getting it as a callback.
Split callback_arguments into run_arg and ensemble_config.
Updated tests.
Inlined exit callback into job_queue_node.

Pre review checklist

  • Read through the code changes carefully after finishing work
  • Make sure tests pass locally (after every commit!)
  • Prepare changes in small commits for more convenient review (optional)
  • PR title captures the intent of the changes, and is fitting for release notes.
  • Updated documentation
  • Ensured that unit tests are added for all new behavior (See
    Ground Rules),
    and changes to existing code have good test coverage.

Pre merge checklist

  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.

@JHolba JHolba self-assigned this Sep 20, 2023
@JHolba JHolba added the release-notes:skip If there should be no mention of this in release notes label Sep 20, 2023
@JHolba JHolba marked this pull request as ready for review September 20, 2023 08:40
@codecov-commenter
Copy link

Codecov Report

Merging #6118 (105110c) into main (c1ab4e6) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #6118      +/-   ##
==========================================
- Coverage   82.48%   82.46%   -0.03%     
==========================================
  Files         350      350              
  Lines       21442    21434       -8     
  Branches      834      834              
==========================================
- Hits        17687    17675      -12     
- Misses       3457     3461       +4     
  Partials      298      298              
Files Changed Coverage Δ
src/ert/job_queue/queue.py 88.33% <ø> (ø)
src/ert/simulator/simulation_context.py 87.39% <ø> (-0.11%) ⬇️
src/ert/callbacks.py 94.82% <100.00%> (-0.42%) ⬇️
src/ert/ensemble_evaluator/_builder/_legacy.py 92.06% <100.00%> (-0.07%) ⬇️
src/ert/ensemble_evaluator/_builder/_step.py 100.00% <100.00%> (ø)
src/ert/job_queue/job_queue_node.py 92.03% <100.00%> (+0.03%) ⬆️
src/ert/run_models/base_run_model.py 94.02% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@pinkwah pinkwah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

@JHolba JHolba force-pushed the remove-fmodel-callbacks branch 3 times, most recently from a865268 to bc2f62f Compare September 20, 2023 12:57
@@ -194,10 +194,12 @@ def run_done_callback(self) -> Optional[LoadStatus]:

def run_timeout_callback(self) -> None:
if self.callback_timeout:
self.callback_timeout(*self.callback_arguments)
self.callback_timeout(self.run_arg.iens)

def run_exit_callback(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we avoid the string "callback" altogether?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just a first pass. we will do more cleanup in later PRs

@JHolba JHolba force-pushed the remove-fmodel-callbacks branch 2 times, most recently from f1ddbbb to e2a30e1 Compare September 20, 2023 13:50
Removed callbacks and split callback_arguments into run_arg and
ensemble_config.
Updated tests.
Inlined exit callback into job_queue_node.
@JHolba JHolba force-pushed the remove-fmodel-callbacks branch from e2a30e1 to ef63ac0 Compare September 20, 2023 20:12
@JHolba JHolba merged commit fcf92f3 into equinor:main Sep 20, 2023
39 checks passed
@JHolba JHolba deleted the remove-fmodel-callbacks branch September 20, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:skip If there should be no mention of this in release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants